package NiuKe;

import java.io.*;
import java.util.*;

/**
 * 链接：https://ac.nowcoder.com/acm/contest/11221/A
 * 来源：牛客网
 */
public class WaterSprite {
    static StreamTokenizer sc=new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static int nextInt() throws IOException {
        sc.nextToken();
        return (int) sc.nval;
    }
    public static void main(String[] args) throws IOException {
        int n = nextInt();
        int[][] allScores = new int[n][];
        for (int i = 0; i < n; i++) {
            int m = nextInt();
            int[] scores = new int[m];
            for (int i1 = 0; i1 < m; i1++) {
                scores[i1] = nextInt();
            }
            allScores[i] = scores;
        }
        solution(allScores);
    }

    public static void solution(int[][] allScores) {
        HashMap<Integer, List<Integer>> map = new HashMap<>();
        for (int[] scores : allScores) {
            int pre = 0;
            int cur = 0;
            for (int i = 1; i < scores.length; ) {
                if(scores[i] >= scores[cur]){
                    cur = i++;
                    if(i != scores.length){
                        continue;
                    }
                }
                int progress = scores[cur] - scores[pre];
                ArrayList<Integer> rection = new ArrayList<>();
                rection.add(pre + 1);
                rection.add(cur + 1);
                if(map.containsKey(progress)){
                    map.get(progress).addAll(rection);
                }else{
                    map.put(progress,rection);
                }
                pre = i;
                cur = i;
                i++;
            }

            int max = -10;
            for (Integer progress : map.keySet()) {
                if(max < progress){
                    max = progress;
                }
            }
            for (Integer r : map.get(max)) {
                out.print(r + " ");
            }
            map.clear();
            out.println();
            out.flush();
        }
    }
}
